#include <QtGui>
#include "board.h"

Board::Board(){
    money = new QLabel("100");

    see = new QPushButton("&See");
    raise = new QPushButton("&Raise");
    fold = new QPushButton("&Fold");

    QWidget *widget = new QWidget;
    QGridLayout *layout = new QGridLayout;
    layout->addWidget(new QLabel("Money: "),0,0);
    layout->addWidget(money,0,1);
    layout->addWidget(see,1,0);
    layout->addWidget(raise,1,1);
    layout->addWidget(fold,1,2);
    widget->setLayout(layout);
    setCentralWidget(widget);
    setWindowTitle("Rummoli!");
    setupMenus();
    statusBar()->showMessage("");
}

void Board::setupMenus(){
    gameMenu = menuBar()->addMenu("&Game");
    modeMenu = menuBar()->addMenu("&Mode");
    helpMenu = menuBar()->addMenu("&Help");

    exitAction = new QAction("E&xit", this);
    exitAction->setShortcut(tr("Ctrl+Q"));
    connect(exitAction, SIGNAL(triggered()), qApp, SLOT(quit()));

    aboutAction = new QAction("&About", this);
    aboutAction->setShortcut(tr("Alt+A"));
    connect(aboutAction, SIGNAL(triggered()), this, SLOT(about()));


    gameMenu->addAction(exitAction);
    helpMenu->addAction(aboutAction);
}

void Board::about(){
    QMessageBox::about(this,"About Rummoli","This is the about text");
}

Board::~Board(){
}
